
<style>
    body.stretch-layout #main footer{
        left: 205px;
    }
    .cj a.active{
        color: #000;
        font-weight: bold;
    }
</style>
<footer>
    <div class="row">
        <div class="col-md-12">
            <div style="text-align: center">Copyright &copy; 2020-<?php echo date('Y'); ?>.版权所有<a target="_blank" rel="noopener noreferrer" href="{$kplphp.product_website}">{$kplphp.product_name}{$kplphp.product_version}</a></div>
        </div>
    </div>
</footer>

<!-- Plugin scripts -->
<script src="__STATIC__/vendors/bundle.js"></script>

<!-- Prism -->
<script src="__STATIC__/vendors/prism/prism.js"></script>

<!-- App scripts -->
<script src="__STATIC__/assets/js/app.min.js"></script>

<script src="__STATIC__/assets/js/examples/toast.js"></script>


<script src="__STATIC__/vendors/layui/layui.js"></script>
<script>
    //接收ifram页面返回的消息
    function iframe_form_msg(code, msg, url = ''){
        //这里简单弹窗，想要其他效果可以用其他插件弹窗
        if(code == 1){
            toastr.success(msg);
            setTimeout(function(){
                location.href = url;
            }, 1000);
        }else{
            toastr.error(msg);
        }
    }

    // 新窗口图片
    function lookimg(str) {
        var newwin = window.open();
        newwin.document.write("<div style='text-align:center'><img src="+str+" /></div>")
    }


    // 文章删除
    function delImageOrVideo(path) {
        $.post('{:url("/upload/delImageOrVideo")}', {path:path} ,function (res) {
            console.log(res)
        });
    }

    // 图片显示删除
    $(document).on("mouseenter mouseleave", ".file-iteme", function(event){
        if(event.type === "mouseenter"){
            //鼠标悬浮
            $(this).children(".info").fadeIn("fast");
            $(this).children(".handle").fadeIn("fast");
        }else if(event.type === "mouseleave") {
            //鼠标离开
            $(this).children(".info").hide();
            $(this).children(".handle").hide();
        }
    });

    function getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var seperator2 = ":";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + date.getHours() + seperator2 + date.getMinutes()
            + seperator2 + date.getSeconds();
        return currentdate;
    }

    $(document).ready(function () {
        $('.my_cids').select2();
    });


    $(function () {
        // 城市
        $('#province').change(function () {
            var pid = $("#province option:selected").val();
            $.ajax({
                type: "post",
                url: '{:url("/location/getCity")}',
                data: {'pid': pid},
                success: function (res) {
                    console.log(res, res.code)
                    if (res.code == 1) {
                        result = res.data;
                        var strocity = '<option value="">请选择城市</option>';
                        for (var i = 0; i < result.length; i++) {
                            strocity += '<option value=' + result[i].location_id + '>';
                            strocity += result[i].name;
                            strocity += '</option>';
                        }
                        $("#city").text('');
                        $("#area").text('');
                        $("#area").append('<option value="">请选择地区</option>');
                        $("#city").append(strocity);
                    } else {
                        toastr.error(res.msg);
                    }
                }
            })
        });

        // 地区
        $('#city').change(function () {
            var pid = $("#city option:selected").val();
            $.ajax({
                type: "post",
                url: '{:url("/location/getArea")}',
                data: {'pid': pid},
                success: function (res) {
                    if (res.code == 1) {
                        result = res.data;
                        var strocity = '<option value="">请选择地区</option>';
                        for (var i = 0; i < result.length; i++) {
                            strocity += '<option value=' + result[i].location_id + '>';
                            strocity += result[i].name;
                            strocity += '</option>';
                        }
                        $("#area").text('');
                        $("#area").append(strocity);
                    } else {
                        toastr.error(res.msg);
                    }
                }
            })
        });

        // 一级分类
        $('.top_cate').change(function () {
            // 重置自定义分类框
            $('#other_cate').css('display', 'none');
            $('input[name="other_cate"]').val('');
            $.ajax({
                type: "post",
                url: '{:url("/industryCate/getChildrenCate")}',
                data: {'pid': $(".top_cate option:selected").val()},
                success: function (res) {
                    console.log(res, res.code)
                    if (res.code == 1) {
                        result = res.data;
                        var strocate = '<option value="">请选择二级分类</option>';
                        for (var i = 0; i < result.length; i++) {
                            strocate += '<option value=' + result[i].id + '>';
                            strocate += result[i].name;
                            strocate += '</option>';
                        }
                        $(".child_cate").text('');
                        $(".child_cate").append(strocate);
                    } else {
                        toastr.error(res.msg);
                    }
                }
            })
        });
    });

    function otherCate(t) {
        $('#other_cate').css('display', 'flex');
        $('.top_cate').prop('selectedIndex', 0);
        $('.child_cate option:not(:first)').remove();
    }




</script>
<div id="alert_message" style="display:none">
    <iframe name=iframe_form id="ifr" scrolling="no"></iframe>
</div>